import random

compCount = 0;
userCount = 0;
while True:
    comp = random.randint(0, 2)
    user = int(input())
    compTag = ""
    userTag = ""
    if comp == 0:
        compTag = "剪刀"
    elif comp == 1:
        compTag = "石头"
    else:
        compTag = "布"
    if user == 0:
        userTag = "剪刀"
    elif user == 1:
        userTag = "石头"
    else:
        userTag = "布"
    print("本轮 计算机出的 " + compTag)
    print("本轮 用户出的 " + userTag)
    if user == comp:
        print("本轮 平局")
    elif user - comp == 1 or user - comp == -2:
        print("本轮 用户赢")
        userCount += 1
    else:
        print("本轮 计算机赢")
        compCount += 1
    if userCount == 3:
        print("最终 用户赢的胜利!")
        break
    if compCount == 3:
        print("最终 计算机赢的胜利!")
        break
